Readings for Week 01:
Replace it!

This is a meaningful subtitle

Readings
Week 1
Author

Dr. Gordon Wright

Published

October 2, 2023

Example Questions

Fill-In-The-Blanks (fitb())

Create fill-in-the-blank questions using fitb(), providing the answer as the first argument.

  • 2 + 2 is
  • What is the letter after D?

If you want to ignore differences in whitespace use, use the argument ignore_ws = TRUE (which is the default) and include spaces in your answer anywhere they could be acceptable.

  • How do you load the tidyverse package?

You can set more than one possible correct answer by setting the answers as a vector.

  • Type a vowel:

You can use regular expressions to test answers against more complex rules.

  • Type any 3 letters:

Multiple Choice (mcq())

  • “Never gonna give you up, never gonna:
  • “I down in Africa” -Toto

True or False (torf())

  • True or False? You can permute values in a vector using sample().

Longer MCQs (longmcq())

When your answers are very long, sometimes a drop-down select box gets formatted oddly. You can use longmcq() to deal with this. Since the answers are long, It’s probably best to set up the options inside an R chunk with echo=FALSE.

What is a p-value?

What is true about a 95% confidence interval of the mean?

Checked sections

Create sections with the class webex-check to add a button that hides feedback until it is pressed. Add the class webex-box to draw a box around the section (or use your own styles).

I am going to learn a lot:

What is a p-value?

Hidden solutions and hints

You can fence off a solution area that will be hidden behind a button using hide() before the solution and unhide() after, each as inline R code. Pass the text you want to appear on the button to the hide() function.

If the solution is a code chunk, instead of using hide() and unhide(), simply set the webex.hide chunk option to TRUE, or set it to the string you wish to display on the button.

Recreate the scatterplot below, using the built-in cars dataset.

See the documentation for plot() (?plot)

Code
plot(cars$speed, cars$dist)

Reuse

CC BY-NC-SA